package com.example.edu.Mapper;

import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface Article_PictureMapper {
    @Delete("delete from article_picture where picture_id = #{picture_id} and telephone = #{telephone}")
    void deleteRelation(@Param("telephone") String telephone,@Param("picture_id") int picture_id);

    @Delete("delete from article_picture where article_id = #{article_id}")
    void delete(@Param("article_id") int article_id);

    void insertMany(@Param("article_id") int article_id, @Param("picture_ids") List<Integer> picture_ids,@Param("telephone") String telephone);

}
